import axios from 'axios';

export async function registerApi(data:any)
{
    const header = {
        "Content-Type": "application/json"
    }
    try {
        const response = await axios.post("http://localhost:8000/register/",
            data,
            {
                headers:header
            }
            )
        if(response.status === 200){
            if(response.data.msg==="success")
            {
                return true
            }
        }
    }catch (error)
    {
        console.log(error)
        return false
    }
}